package mymath

import (
	"math"
)

const (
	LightSpeed = 30 * 10000
)

/*爱因斯坦能量方程*/
func GetEinsteinEnergy(mass float64) (energy float64) {
	return mass * math.Pow(LightSpeed, 2)
}

/*求两点之间的距离*/
func GetDistance(x1, y1, x2, y2 float64) float64 {
	return math.Sqrt(math.Pow(x1-x2, 2) + math.Pow(y1-y2, 2))
}
